/*
 * @Author: your name
 * @Date: 2022-04-24 10:46:13
 * @LastEditTime: 2022-08-29 10:35:36
 * @LastEditors: YNT 2501512800@qq.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \22-03-19 智慧社区\api\party.js
 */
import wxRequest from '../utils/wx-request'

class SpecialModel extends wxRequest {
  // 资讯列表
  newsList(id, params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=${id}`,
      method: 'GET',
      params,
    })
  }

  // 畬乡介绍
  sxIntroduce(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=1`,
      method: 'GET',
      params,
    })
  }

  // 畬乡推荐
  sxRecommend(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=2`,
      method: 'GET',
      params,
    })
  }

  // 人员信息列表
  personInfo(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=3`,
      method: 'GET',
      params,
    })
  }

  // 平战结合体系
  warList(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=4`,
      method: 'GET',
      params,
    })
  }

  // 党群中心列表
  centerList(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=5`,
      method: 'GET',
      params,
    })
  }

  // 红色路线列表
  redLineList(params) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang/list?party_news_type_id=6`,
      method: 'GET',
      params,
    })
  }

  Detail(id) {
    return this.request({
      url: `/api/v1/party_building_news/shexiang?id=${id}`,
      method: 'GET',
    })
  }

  // 党员信息列表
  partyBranchList() {
    return this.request({
      url: `/api/v1/party_user/type`,
      method: 'GET',
    })
  }

  partyMemberList(id, params) {
    return this.request({
      url: `/api/v1/party_user/list?party_user_type_id=${id}`,
      method: 'GET',
      params,
    })
  }

  // 党员信息详情
  partyMemberDetail(id) {
    return this.request({
      url: `/api/v1/party_user?id=${id}`,
      method: 'GET',
    })
  }

  // 党员激活
  partyMemberActive(data) {
    return this.request({
      url: `/api/v1/party_user`,
      method: 'POST',
      data,
    })
  }

  //  获取当前志愿者状态
  volunteerStatus() {
    return this.request({
      url: `/api/v1/party_volunteer/check`,
      method: 'GET',
    })
  }

  //  志愿者申请
  volunteerApply() {
    return this.request({
      url: `/api/v1/party_volunteer/join`,
      method: 'GET',
    })
  }

  // // 志愿者组织
  // volunteerList() {
  //   return this.request({
  //     url: `/api/party/volunteer/group/`,
  //     method: 'GET',
  //   })
  // }

  // // 申请加入志愿者组织
  // volunteerPartJoin(params) {
  //   return this.request({
  //     url: `/api/party/volunteer/group/`,
  //     method: 'POST',
  //     params,
  //   })
  // }

  // 志愿者活动列表
  volunteerActList() {
    return this.request({
      url: `/api/v1/party_volunteer/activity/list`,
      method: 'GET',
    })
  }

  // 志愿者活动详情
  volunteerActDetail(id) {
    return this.request({
      url: `/api/v1/party_volunteer/activity?id=${id}`,
      method: 'GET',
    })
  }

  // 志愿评论
  volunteerComment(params) {
    return this.request({
      url: `/api/v1/party_volunteer/activity/comment`,
      method: 'POST',
      params,
    })
  }

  // 志愿评论点赞
  volunteerCommentLike(params) {
    return this.request({
      url: `/api/v1/party_volunteer/activity/comment/like`,
      method: 'get',
      params,
    })
  }

  // 志愿活动报名
  volunteerSign(id) {
    return this.request({
      url: `/api/v1/party_volunteer/activity/get_sign_up?id=${id}`,
      method: 'GET',
    })
  }

  // 志愿活动签到
  volunteerSignIn(id) {
    return this.request({
      url: `/api/v1/party_volunteer/activity/get_sign_in?id=${id}`,
      method: 'GET',
    })
  }
}

export default new SpecialModel()
